import request from '@/utils/request'

// 查询分公司配置列表
export function listCompanyInfo(query) {
  return request({
    url: '/crmsys/companyInfo/list',
    method: 'get',
    params: query
  })
}
// 不分页
export function allListCompanyInfo(query) {
  return request({
    url: '/crmsys/companyInfo/getAllList',
    method: 'get',
    params: query
  })
}

// 查询分公司配置详细
export function getCompanyInfo(orgId) {
  return request({
    url: '/crmsys/companyInfo/' + orgId,
    method: 'get'
  })
}

// 新增分公司配置
export function addCompanyInfo(data) {
  return request({
    url: '/crmsys/companyInfo',
    method: 'post',
    data: data
  })
}

// 修改分公司配置
export function updateCompanyInfo(data) {
  return request({
    url: '/crmsys/companyInfo',
    method: 'put',
    data: data
  })
}

// 删除分公司配置
export function delCompanyInfo(orgId) {
  return request({
    url: '/crmsys/companyInfo/' + orgId,
    method: 'delete'
  })
}


// 查询城市
export function getCity(query) {
  return request({
    url: '/crmsys/companyInfo/getCity',
    method: 'get',
    params: query
  })
}
